.
authorJeroen van der Heijden <jeroen@transceptor.technology>
Wed, 26 Sep 2018 10:14:08 +0000 (12:14 +0200)
committerJeroen van der Heijden <jeroen@transceptor.technology>
Wed, 26 Sep 2018 10:14:08 +0000 (12:14 +0200)
.travis.yml
Debug/makefile
Release/makefile
include/imap/imap.h
makefile.init [deleted file]
src/imap/imap.c

index 12900d6b5ea5deb71be97b415521a913839b6ba1..c18951ab48ccdcb549e21b610ccebe30d684e11f 100644 (file)
@@ -28,5 +28,6 @@ matrix:
         - sudo make install
         - cd ../../
       script:
-        - splint *.c
+        - make test
+        - CFLAGS="-Werror -std=gnu89" && make
 
index c1b0a2dd1ad57b14efba4d2c74ae85e12c8eb5e9..016c20642adb97498024f6776cccbbe48b40301a 100644 (file)
@@ -51,14 +51,14 @@ endif
 
 OS := $(shell uname)
 ifeq ($(OS),Darwin)
-CRYPT := 
+CRYPT :=
 UUID :=
 else
 CRYPT := -lcrypt
 UUID := -luuid
 endif
 
-# Add inputs and outputs from these tool invocations to the build variables 
+# Add inputs and outputs from these tool invocations to the build variables
 
 # All Target
 all: siridb-server
@@ -80,3 +80,6 @@ clean:
 .SECONDARY:
 
 -include ../makefile.targets
+
+test:
+       -@cd ../test && ./test.sh
\ No newline at end of file
index 945fa2448a255b23b5e1974be419efd6728f2c49..16b41bcafe2bfbfc95a112367a4783c63083cbd1 100644 (file)
@@ -51,14 +51,14 @@ endif
 
 OS := $(shell uname)
 ifeq ($(OS),Darwin)
-CRYPT := 
+CRYPT :=
 UUID :=
 else
 CRYPT := -lcrypt
 UUID := -luuid
 endif
 
-# Add inputs and outputs from these tool invocations to the build variables 
+# Add inputs and outputs from these tool invocations to the build variables
 
 # All Target
 all: siridb-server
@@ -67,7 +67,7 @@ all: siridb-server
 siridb-server: $(OBJS) $(USER_OBJS)
        @echo 'Building target: $@'
        @echo 'Invoking: GCC C Linker'
-       gcc  -o "siridb-server" $(OBJS) $(USER_OBJS) $(LDFLAGS) $(LIBS) $(CRYPT) $(UUID) 
+       gcc  -o "siridb-server" $(OBJS) $(USER_OBJS) $(LDFLAGS) $(LIBS) $(CRYPT) $(UUID)
        @echo 'Finished building target: $@'
        @echo ' '
 
@@ -80,3 +80,6 @@ clean:
 .SECONDARY:
 
 -include ../makefile.targets
+
+test:
+       -@cd ../test && ./test.sh
\ No newline at end of file
index 42e92d71d0b142540a7873a2110608d82051568b..339f30ccdcb1ced01e63ce9ac8ba273a69ef05b6 100644 (file)
@@ -30,7 +30,7 @@ typedef void (*imap_update_cb)(
 imap_t * imap_new(void);
 void imap_free(imap_t * imap, imap_free_cb cb);
 int imap_set(imap_t * imap, uint64_t id, void * data);
-int imap_add(imap_t * imap, uint64_t id, void * data);
+unsigned int imap_add(imap_t * imap, uint64_t id, void * data);
 void * imap_get(imap_t * imap, uint64_t id);
 void * imap_pop(imap_t * imap, uint64_t id);
 int imap_walk(imap_t * imap, imap_cb cb, void * data);
diff --git a/makefile.init b/makefile.init
deleted file mode 100644 (file)
index de39f39..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-test:
-       @cd ../test && ./test.sh
index 7271c9b67ebd766222b0ff933e84afc2f49a0a76..0fc56b34287c9e6ff7b94013a4d98bff5abe777f 100644 (file)
@@ -158,7 +158,7 @@ int imap_set(imap_t * imap, uint64_t id, void * data)
  * In case of a memory error we return -1. When the id already exists -2 will
  * be returned.
  */
-int imap_add(imap_t * imap, uint64_t id, void * data)
+unsigned int imap_add(imap_t * imap, uint64_t id, void * data)
 {
 #if DEBUG
     /* insert NULL is not allowed */